package org.hawk.gwt.ppc.parser;

/**
 * Represents java new operator.
 * 
 * @author alex.bereznevatiy@gmail.com
 *
 */
public interface NewOperatorExpressionDescriptor extends ExpressionDescriptor, CallExpressionDescriptor {
	
	/**
	 * @return name of the type to be constructed
	 */
	String getType();
	
	/**
	 * @return descriptor for anonymous class to be constructed or <code>null</code>
	 * if this expression is not an anonymous class expression.
	 */
	ClassDescriptor getAnonymousClass();

	/**
	 * @return <code>true</code> if this new expression is an array expression.
	 */
	boolean isArray();

	/**
	 * @return initializer expression for this array or <code>null</code> if this new expression is
	 * not an array or has no initializer.
	 */
	InitializerExpressionDescriptor getInitializerExpression();
}
